<?php
@session_start();
include "../../../jerimum/classes/bd.php";
include "../../../jerimum/classes/clientes.php";
$_cli	= new clientes(); #CLASSES

@session_start();

$acao	= $_REQUEST["acao"];
$id		= $_POST["id"];
$dados	= $_cli->pega($id);

switch($acao){
		
		case "mudar_senha":
		$senha		= $_REQUEST["n_senha"];
		$senha_r	= $_REQUEST["n_senha_r"];
		
		if($senha != $senha_r){
		#SENHAS DIFERENTES
		header("Location: /painel.php?acao=configuracao-usuario&msg=2");
		}else{
		
		$mudar = $_cli->mudasenha($id,$senha);
		
		if($mudar){
		header("Location: /painel.php?acao=configuracao-usuario&msg=1");
		}else{
		header("Location: /painel.php?acao=configuracao-usuario&msg=3");
		}
		
		}
		
				
		break;
}

?>